/**
  ******************************************************************************
  * @author     Chris
  * @since      2024/6/10 10:36
  *
  * @file       hd_oled_protocol.h
  * @brief      Header file of OLED protocol hardware driver.
  *
  * @note       This file contains the OLEDProtocol object declaration.
  *
  * @warning    None.
  ******************************************************************************
  * Change Logs:
  *   Date           Author       Notes
  *   2024/6/10      Chris        the first version
  *
  ******************************************************************************
  */

#ifndef JLC_SKY_OLED_PROTOCOL_H
#define JLC_SKY_OLED_PROTOCOL_H

#include "stm32f4xx.h"
#include "drivers.h"

typedef struct OLEDProtocolDef OLEDProtocol;

struct OLEDProtocolDef {
    void (*init)(OLEDProtocol *this);

    void (*write)(OLEDProtocol *this,
                  uint8_t salveAddress, uint16_t regAddress, uint8_t *dat, uint8_t len);
};

extern const struct OLEDProtocolClass {
    OLEDProtocol *(*build)();
} OLEDProtocolBuilder;


#endif // JLC_SKY_OLED_PROTOCOL_H
